1. Statement of the Technical Field
The present invention relates to the field of software functional testing and more particularly to disambiguating like objects in a functional testing tool.
2. Description of the Related Art
Software functional testing relates to the functional testing of a graphical user interface (GUI) coupled to an underlying software application. Conventional functional testing tools allow the end user to create, modify and run functional, distributed functional, regression and smoke tests for applications built using any of a wide variety of integrated development environments. In this regard, the conventional functional testing tool can generate a test script for a GUI in which elements of the GUI can be exercised both sequentially and conditionally. Through a thorough testing of the GUI of an application, the functional testing tool can automatically identify defects early, often and repeatably.
In operation, the conventional functional testing tool can monitor and record the interaction between end user and GUI during a recording phase of functional testing. In this regard, a testing script can be produced based upon the identity of GUI elements addressed by the end user and the sequence in which the GUI elements are addressed. Within the script, GUI elements, referred to herein as “objects”, can be identified by absolute reference to each object. The absolute reference can include any number of element properties which, when combined with one another, can uniquely identify the desired object. Properties can include any explicit object property such as a data or method member, or any metadata associated with the object. Examples can include the class index, the accessible role, the object position, associated text, class name, and child and parent element identity, just to name a few.
Yet, the skilled artisan will recognize the inherent danger in absolutely identifying an object. Specifically, during the course of developing an application, the properties of an object can change as elements are added, modified and deleted from the application. Moreover, ambiguities can arise where the uniqueness of a GUI related object is dissolved as a result of an added, modified or deleted object. Oftentimes, the generic reference to a GUI element in an application under test can fail for ambiguity where multiple applications or application containers under test include a similar element. For instance, the “back” button in a content browser will exist in each content browser spawned as part of an application under test. Similarly, an “OK” button may exist in multiple applications spawned as part of an application under test. Consequently, an absolute reference to an object in the GUI can be rendered invalid and unresolvable in the face of application modifications. Therefore, the script generated to exercise the GUI suddenly can become inoperable.
To address the foregoing deficiencies several popular functional testing tools have augmented the number of properties available to uniquely identify a GUI element. By increasing the number of possible combinations of GUI element properties, it is presumed that uniquely specifying a GUI element merely is a matter of selecting enough properties in combination with one another such that no other GUI element is likely to be confused with the intended GUI element. In any case, where a desired object cannot be located during the testing phase of an application, an “object not found” exception can arise defeating the operation of the functional testing tool, regardless of the augmentation of the number of properties available to uniquely identify the GUI element.